<?php

namespace App\Models;

use App\Enums\LoginMode;
use BenSampo\Enum\Traits\CastsEnums;
use Illuminate\Database\Eloquent\Relations\BelongsTo;

/**
 * @mixin IdeHelperLoginHistory
 */
class LoginHistory extends BaseModel
{
    use CastsEnums;

    protected $casts = [
        'login_mode' => LoginMode::class,
    ];

    public function channel(): BelongsTo
    {
        return $this->belongsTo(Channel::class, 'channel_id');
    }
}
